package org.learn.test;

public class HomeWork12 {
    public static void main(String[] args) {
    Music music = new Music("飞蛾扑火",45);
    music.play();
    }
}
class Music {
    String name;
    int time;
    public Music(String name, int times){
       this.name = name;
       this.time = times;
    }
    public void play(){
        System.out.println("音乐" + name + "正在播放中。。。时长为" + time + "秒");
    }
}
